package com.shanyin.framework.member.service;

import com.shanyin.framework.common.base.BaseService;
import com.shanyin.framework.common.base.ResponseData;
import com.shanyin.framework.member.entity.SysUser;
/**
 * @author qing.yunhui 
 * @Since 2011-2018
 * @create 2018-05-23 14:35:32
 * @history
 */
public interface SysUserService extends BaseService<SysUser,Long>{
	
	/**
     * <p>注册</p>
     * @param phone 注册手机号
     * @param password 密码
     * @param registerChannel 注册渠道
     * @param invitationCode  邀请码
     * @return
     * */
	ResponseData registered(String phone,String password,String registerChannel,String invitationCode);
	
	/**
     * <p>支持(手机号|邮箱)登陆</p>
     * @param account 登陆账号
     * @param password 密码
     * @param isPhone true:手机号登陆、false:邮箱登陆
     * @return
     * */
	ResponseData login(String account,String password,boolean isPhone);
    
	/**
	 * <p>根据手机号查找用户</p>
	 * @param phone 手机号
	 * @return 
	 * */
	SysUser getSysUserByPhone(String phone);
	
	/**
	 * <p>根据邀请码查找用户</p>
	 * @param invitationCode 邀请码
	 * @return 
	 * */
	SysUser getSysUserByInvitationCode(String invitationCode);
}